﻿public class ClassFactory
{
    public static object NewClassByName(string name)
    {
        switch(name)
        {
            case "InitState":
                return new InitState();
            case "StandState":
                return new StandState();
            case "StandDefenseState":
                return new StandDefenseState();
            case "StandHitState":
                return new StandHitState();
            case "StandDefenseHitState":
                return new StandDefenseHitState();
            case "WalkForwardState":
                return new WalkForwardState();
            case "WalkBackwardState":
                return new WalkBackwardState();
            case "JumpState":
                return new JumpState();
            case "JumpForwardState":
                return new JumpForwardState();
            case "JumpBackwardState":
                return new JumpBackwardState();
            case "JumpHitState":
                return new JumpHitState();
            case "CrouchState":
                return new CrouchState();
            case "CrouchDefenseState":
                return new CrouchDefenseState();
            case "CrouchHitState":
                return new CrouchHitState();
            case "CrouchDefenseHitState":
                return new CrouchDefenseHitState();
            case "DizzyState":
                return new DizzyState();
            case "KnockdownHitState":
                return new KnockdownHitState();
            case "ThrowHitState":
                return new ThrowHitState();
            case "HitFlyState":
                return new HitFlyState();
            case "DeadState":
                return new DeadState();
            case "CounterAttackHitState":
                return new CounterAttackHitState();
            case "FloatHitState":
                return new FloatHitState();
            default:
                return null;
        }
    }
}
